3.10 \(\int \frac{d+e x}{4-5 x^2+x^4} \, dx\)

Optimal. Leaf size=45 \[ -\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right ) \]

[Out]

-(d*ArcTanh[x/2])/6 + (d*ArcTanh[x])/3 - (e*Log[1 - x^2])/6 + (e*Log[4 - x^2])/6

________________________________________________________________________________________

Rubi [A]  time = 0.0324412, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {1673, 12, 1093, 207, 1107, 616, 31} \[ -\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(4 - 5*x^2 + x^4),x]

[Out]

-(d*ArcTanh[x/2])/6 + (d*ArcTanh[x])/3 - (e*Log[1 - x^2])/6 + (e*Log[4 - x^2])/6

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{d+e x}{4-5 x^2+x^4} \, dx &=\int \frac{d}{4-5 x^2+x^4} \, dx+\int \frac{e x}{4-5 x^2+x^4} \, dx\\ &=d \int \frac{1}{4-5 x^2+x^4} \, dx+e \int \frac{x}{4-5 x^2+x^4} \, dx\\ &=\frac{1}{3} d \int \frac{1}{-4+x^2} \, dx-\frac{1}{3} d \int \frac{1}{-1+x^2} \, dx+\frac{1}{2} e \operatorname{Subst}\left (\int \frac{1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=-\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)+\frac{1}{6} e \operatorname{Subst}\left (\int \frac{1}{-4+x} \, dx,x,x^2\right )-\frac{1}{6} e \operatorname{Subst}\left (\int \frac{1}{-1+x} \, dx,x,x^2\right )\\ &=-\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0179092, size = 50, normalized size = 1.11 \[ \frac{1}{12} (-2 (d+e) \log (1-x)+(d+2 e) \log (2-x)+2 (d-e) \log (x+1)-(d-2 e) \log (x+2)) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(4 - 5*x^2 + x^4),x]

[Out]

(-2*(d + e)*Log[1 - x] + (d + 2*e)*Log[2 - x] + 2*(d - e)*Log[1 + x] - (d - 2*e)*Log[2 + x])/12

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 58, normalized size = 1.3 \begin{align*} -{\frac{\ln \left ( 2+x \right ) d}{12}}+{\frac{\ln \left ( 2+x \right ) e}{6}}+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}+{\frac{\ln \left ( x-2 \right ) d}{12}}+{\frac{\ln \left ( x-2 \right ) e}{6}}-{\frac{\ln \left ( x-1 \right ) d}{6}}-{\frac{\ln \left ( x-1 \right ) e}{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/(x^4-5*x^2+4),x)

[Out]

-1/12*ln(2+x)*d+1/6*ln(2+x)*e+1/6*ln(1+x)*d-1/6*ln(1+x)*e+1/12*ln(x-2)*d+1/6*ln(x-2)*e-1/6*ln(x-1)*d-1/6*ln(x-
1)*e

________________________________________________________________________________________

Maxima [A]  time = 0.957648, size = 58, normalized size = 1.29 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left (x - 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

-1/12*(d - 2*e)*log(x + 2) + 1/6*(d - e)*log(x + 1) - 1/6*(d + e)*log(x - 1) + 1/12*(d + 2*e)*log(x - 2)

________________________________________________________________________________________

Fricas [A]  time = 1.90501, size = 143, normalized size = 3.18 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left (x - 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

-1/12*(d - 2*e)*log(x + 2) + 1/6*(d - e)*log(x + 1) - 1/6*(d + e)*log(x - 1) + 1/12*(d + 2*e)*log(x - 2)

________________________________________________________________________________________

Sympy [B]  time = 2.17518, size = 515, normalized size = 11.44 \begin{align*} - \frac{\left (d - 2 e\right ) \log{\left (x + \frac{- 35 d^{4} e + \frac{51 d^{4} \left (d - 2 e\right )}{2} - 180 d^{2} e^{3} - 90 d^{2} e^{2} \left (d - 2 e\right ) + 41 d^{2} e \left (d - 2 e\right )^{2} - \frac{15 d^{2} \left (d - 2 e\right )^{3}}{2} + 320 e^{5} - 96 e^{4} \left (d - 2 e\right ) - 80 e^{3} \left (d - 2 e\right )^{2} + 24 e^{2} \left (d - 2 e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{12} + \frac{\left (d - e\right ) \log{\left (x + \frac{- 35 d^{4} e - 51 d^{4} \left (d - e\right ) - 180 d^{2} e^{3} + 180 d^{2} e^{2} \left (d - e\right ) + 164 d^{2} e \left (d - e\right )^{2} + 60 d^{2} \left (d - e\right )^{3} + 320 e^{5} + 192 e^{4} \left (d - e\right ) - 320 e^{3} \left (d - e\right )^{2} - 192 e^{2} \left (d - e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{6} - \frac{\left (d + e\right ) \log{\left (x + \frac{- 35 d^{4} e + 51 d^{4} \left (d + e\right ) - 180 d^{2} e^{3} - 180 d^{2} e^{2} \left (d + e\right ) + 164 d^{2} e \left (d + e\right )^{2} - 60 d^{2} \left (d + e\right )^{3} + 320 e^{5} - 192 e^{4} \left (d + e\right ) - 320 e^{3} \left (d + e\right )^{2} + 192 e^{2} \left (d + e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{6} + \frac{\left (d + 2 e\right ) \log{\left (x + \frac{- 35 d^{4} e - \frac{51 d^{4} \left (d + 2 e\right )}{2} - 180 d^{2} e^{3} + 90 d^{2} e^{2} \left (d + 2 e\right ) + 41 d^{2} e \left (d + 2 e\right )^{2} + \frac{15 d^{2} \left (d + 2 e\right )^{3}}{2} + 320 e^{5} + 96 e^{4} \left (d + 2 e\right ) - 80 e^{3} \left (d + 2 e\right )^{2} - 24 e^{2} \left (d + 2 e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{12} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x**4-5*x**2+4),x)

[Out]

-(d - 2*e)*log(x + (-35*d**4*e + 51*d**4*(d - 2*e)/2 - 180*d**2*e**3 - 90*d**2*e**2*(d - 2*e) + 41*d**2*e*(d -
 2*e)**2 - 15*d**2*(d - 2*e)**3/2 + 320*e**5 - 96*e**4*(d - 2*e) - 80*e**3*(d - 2*e)**2 + 24*e**2*(d - 2*e)**3
)/(9*d**5 - 160*d**3*e**2 + 256*d*e**4))/12 + (d - e)*log(x + (-35*d**4*e - 51*d**4*(d - e) - 180*d**2*e**3 +
180*d**2*e**2*(d - e) + 164*d**2*e*(d - e)**2 + 60*d**2*(d - e)**3 + 320*e**5 + 192*e**4*(d - e) - 320*e**3*(d
 - e)**2 - 192*e**2*(d - e)**3)/(9*d**5 - 160*d**3*e**2 + 256*d*e**4))/6 - (d + e)*log(x + (-35*d**4*e + 51*d*
*4*(d + e) - 180*d**2*e**3 - 180*d**2*e**2*(d + e) + 164*d**2*e*(d + e)**2 - 60*d**2*(d + e)**3 + 320*e**5 - 1
92*e**4*(d + e) - 320*e**3*(d + e)**2 + 192*e**2*(d + e)**3)/(9*d**5 - 160*d**3*e**2 + 256*d*e**4))/6 + (d + 2
*e)*log(x + (-35*d**4*e - 51*d**4*(d + 2*e)/2 - 180*d**2*e**3 + 90*d**2*e**2*(d + 2*e) + 41*d**2*e*(d + 2*e)**
2 + 15*d**2*(d + 2*e)**3/2 + 320*e**5 + 96*e**4*(d + 2*e) - 80*e**3*(d + 2*e)**2 - 24*e**2*(d + 2*e)**3)/(9*d*
*5 - 160*d**3*e**2 + 256*d*e**4))/12

________________________________________________________________________________________

Giac [A]  time = 1.09427, size = 69, normalized size = 1.53 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

-1/12*(d - 2*e)*log(abs(x + 2)) + 1/6*(d - e)*log(abs(x + 1)) - 1/6*(d + e)*log(abs(x - 1)) + 1/12*(d + 2*e)*l
og(abs(x - 2))